package test.h0813;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author 不知名帅哥
 * @version 1.0
 * @description 爱吃蟠桃的孙悟空
 * @date 2024/8/13 23:25
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] peaches = Arrays.stream(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();
        int h = Integer.parseInt(sc.nextLine()); //守卫离开的时间

        System.out.println(getRes(h, peaches));
    }

    private static int getRes(int h, int[] peaches) {
        if (h < peaches.length) {
            return 0;
        }
        //设定最大速度
        Arrays.sort(peaches);
        int max = peaches[peaches.length - 1];
        int min = 1;
        int speed=0;
        while (min <= max) {
             speed = min + (max - min) / 2;
            //以当前速度吃完需要多少时间
            if (hasEat(peaches, speed, h)) {
                max=speed-1;
            } else {
//                //这里是为了弥补最后一次max--
//                max++;
//                break;
                min=speed+1;
            }
        }
        return speed;
    }

    //判断是否能以speed吃完
    private static boolean hasEat(int[] peaches, int speed, int h) {
        int ans = 0;
        for (int i = 0; i < peaches.length; i++) {
            if (peaches[i] <= speed) {
                ans++;
            } else {
                ans += peaches[i] / speed + 1;
            }
        }
        return ans <= h;
    }
}
